import * as echarts from 'echarts/core';

const weatherForecast = {
    data() {
        return {
            weatherForecast: {
                backgroundColor: '#F5F5F5',
                textStyle: {
                    color: 'black'
                },
                grid: {
                    top: '10%',
                    left: "15%",
                    right: '0%',
                    bottom: '7%',
                },
                dataZoom: [
                    {
                        type: 'inside',
                        xAxisIndex: [0],
                        start: 1,
                        end: 40,
                        zoomLock: true, //锁定区域禁止缩放
                    },

                ],
                // tooltip: {
                //     trigger: 'axis',
                //     axisPointer: {
                //         type: 'shadow'
                //     },
                //     formatter:function(val){
                //         var txt = val[0].name;
                //         return val[0].name+"<br>"+val[0].marker+'最高温&ensp;&ensp;'+val[0].value+"℃<br>"+
                //         val[1].marker+'实时温度'+val[1].value+"℃<br>"+
                //         val[2].marker+'最低温&ensp;&ensp;'+val[2].value+"℃";
                //     }
                // },
                xAxis: {
                    type: 'category',
                    boundaryGap: false,
                    data: ['0', '20', '40', '60', '80', '100']
                  },
                yAxis: {
                    type: 'value',
                    axisLabel: {
                        formatter: '{value} 雨',
                    },
                    axisLine: {
                        lineStyle: {
                            color: '#ccc'
                        }
                    },
                    splitLine: { show: false },
                    // axisLine: {
                    //     show: true,
                    // },
                },
                series: [
                    {
                      data: [820, 932, 901, 934, 1290, 1330],
                      type: 'line',
                      areaStyle: {}
                    }
                  ]
            }
        }
    },
    mounted() {

    },
    components: {

    },
    methods: {

    }
}
export default weatherForecast;